package com.wuuxiang.polestar.admin.dto;

import net.sf.oval.constraint.NotBlank;
import net.sf.oval.constraint.NotNull;

public class UserDto {

	@NotBlank(message = "用户名不能为空")
	@NotNull(message = "用户名不能为空")
	private String username;
	@NotBlank(message = "密码不能为空")
	@NotNull(message = "密码不能为空")
	private String password;
	
	private int isAdmin = 0;

	

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getIsAdmin() {
		if("admin".equals(username.trim())){
			this.isAdmin =  1;
		}
		return isAdmin;
	}

	
}
